/**
 * 
 */
package designpattern.observer;

import java.util.Observable;

/**
 * 加热器
 * @author liuboen
 * 
 * since:2012-6-7
 * version:1.0.0
 */
public class Heater extends Observable {
	private int temperature;
	 
    public int getTemperature() {
       return temperature;
    }
 
    public void setTemperature(int temperature) {
       this.temperature = temperature;
    }
 
    public void boilWater() {
       for (int i = 90; i < 110; i++) {
           temperature = i;
       setChanged();
       notifyObservers();
       }
    }
}
